package com.yzqp.common.log;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

//记日志的行数不对

/**
 * 获得记录日志logger
 */
public class LogUtil {

    public static Logger getBean() {
        Logger logger = LoggerFactory.getLogger(getClassName());
        return logger;
    }

    // 获取调用 error,info,debug静态类的类名
    private static String getClassName() {
        return new SecurityManager() {
            public String getClassName() {
                return getClassContext()[3].getName();
            }
        }.getClassName();
    }
}
